










var mongoose = require("mongoose");
var Schema = mongoose.Schema;



// 社区居民表
var resident1_schema = new Schema({
    username: String,
    mobile: String,
    roleid: String,
    time: Date,
    password:String,
    avatar:String,
    salary:String
})
exports.Resident = mongoose.model("resident1", resident1_schema)


var users1_schema = new Schema({
    username: String,
    mobile: String,
    roleid: String,
    time: Date,
    password:String,
    avatar:String
})
exports.users = mongoose.model("users1", users1_schema)


var staffs1_schema = new Schema({ //员工表
    username: String,
    mobile: String,
    roleid: String,
    time: Date,
    password:String,
    avatar:String
})
exports.staff = mongoose.model("staffs1", staffs1_schema)

// 用户意见表
var advices_schema = new Schema({
    username: String,
    mobile: String,
    roleid: String,
    time: Date,        //发表时间
    title:String,      //意见标题
    content:String,    //意见内容
    category:Array,    //意见类别
    reply:Array,       //回复评论
}) 
exports.Advice = mongoose.model("advices", advices_schema)



var cars_schema = new Schema({
    "name" : String, 
    "price" :Number, 
    "discount" : Number, 
    "img" : String,
    "type" : Object,
    "introduce":String
 })

 exports.Cars = mongoose.model("cars",cars_schema);

 var salarys1_schema = new Schema({  //薪资表
    salary:Number,
    roleid:String,
    work:String
 })

 exports.Salary = mongoose.model("salarys1",salarys1_schema);
